package com.cqan.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cqan.dao.AtomDao;
import com.cqan.entity.Atom;
import com.cqan.orm.Page;
import com.cqan.service.AtomService;

@Service("atomValue")
public class AtomServiceImpl extends EntityServiceImpl<Atom, Long, AtomDao>
		implements AtomService {

	@Override
	@Autowired
	public void setEntityDao(AtomDao entityDao) {
		this.entityDao = entityDao;
	}

	public Page<Atom> reportAtoms(Long rid, Page<Atom> page) {
		
		return entityDao.findPage(page, "from Atom a where a.report.id=? order by a.id desc", rid);
	}


}
